/*    */ package com.cr.framework.config.properties;
/*    */ 
/*    */ import com.alibaba.druid.pool.DruidDataSource;
/*    */ import org.springframework.beans.factory.annotation.Value;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ 
/*    */ @Configuration
/*    */ public class DruidProperties {
/*    */   @Value("${spring.datasource.druid.initialSize}")
/*    */   private int initialSize;
/*    */   
/*    */   @Value("${spring.datasource.druid.minIdle}")
/*    */   private int minIdle;
/*    */   
/*    */   @Value("${spring.datasource.druid.maxActive}")
/*    */   private int maxActive;
/*    */   
/*    */   @Value("${spring.datasource.druid.maxWait}")
/*    */   private int maxWait;
/*    */   
/*    */   @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}")
/*    */   private int timeBetweenEvictionRunsMillis;
/*    */   
/*    */   @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}")
/*    */   private int minEvictableIdleTimeMillis;
/*    */   
/*    */   @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}")
/*    */   private int maxEvictableIdleTimeMillis;
/*    */   
/*    */   @Value("${spring.datasource.druid.validationQuery}")
/*    */   private String validationQuery;
/*    */   
/*    */   @Value("${spring.datasource.druid.testWhileIdle}")
/*    */   private boolean testWhileIdle;
/*    */   
/*    */   @Value("${spring.datasource.druid.testOnBorrow}")
/*    */   private boolean testOnBorrow;
/*    */   
/*    */   @Value("${spring.datasource.druid.testOnReturn}")
/*    */   private boolean testOnReturn;
/*    */   
/*    */   public DruidDataSource dataSource(DruidDataSource datasource) {
/* 51 */     datasource.setInitialSize(this.initialSize);
/* 52 */     datasource.setMaxActive(this.maxActive);
/* 53 */     datasource.setMinIdle(this.minIdle);
/* 56 */     datasource.setMaxWait(this.maxWait);
/* 59 */     datasource.setTimeBetweenEvictionRunsMillis(this.timeBetweenEvictionRunsMillis);
/* 62 */     datasource.setMinEvictableIdleTimeMillis(this.minEvictableIdleTimeMillis);
/* 63 */     datasource.setMaxEvictableIdleTimeMillis(this.maxEvictableIdleTimeMillis);
/* 68 */     datasource.setValidationQuery(this.validationQuery);
/* 70 */     datasource.setTestWhileIdle(this.testWhileIdle);
/* 72 */     datasource.setTestOnBorrow(this.testOnBorrow);
/* 74 */     datasource.setTestOnReturn(this.testOnReturn);
/* 75 */     return datasource;
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-framework-4.7.0.jar!\com\cr\framework\config\properties\DruidProperties.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */